package homework01;

import java.util.Scanner;
public class homework1 {
    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);

        System.out.println("请输入第一个数：");
        int i = scan.nextInt();
        System.out.println("请输入第二个数：");
        int j = scan.nextInt();
        int sum1 = add(i, j);
        double sum2 = add((double) i, (double) j);
        System.out.println("两个整数和为：" + sum1);
        System.out.println("两个小数和为：" + sum2);
    }

    public static int add(int i, int j) {
        return i + j;
    }

    public static double add(double i, double j) {
        return i + j;
    }
}
